package com.echo.code.spring.springbootdemo.schedule;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.util.concurrent.TimeUnit;

/**
 * Description
 *
 * @author baiyp
 * @version 1.0.0
 * @date 2019/04/28
 */
public class App {
  public static void main(String[] args) throws InterruptedException {
    AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
    context.register(ScheduleConfig.class);
    context.refresh();
    ScheduledTaskService service = context.getBean(ScheduledTaskService.class);
    TimeUnit.HOURS.sleep(1);
    context.close();
  }
}
